package Algorithm.RandomRollCallDevice;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Third {
    public static void main(String[] args) {
        Random rand = new Random();
        ArrayList<String> list = new ArrayList<>();
        ArrayList<String> list1 = new ArrayList<>();
        Collections.addAll(list, "Jack", "Mike", "Black", "Marks", "Jon", "Nick", "Alic", "Alma", "Alva");
        for (int i = 0; i < 10; i++) {
            list1.addAll(list);
            int size = list1.size();
            for (int j = 0; j < size; j++) {
                int index = rand.nextInt(list1.size());
                System.out.print(list1.remove(index) + " ");
            }
            System.out.println();
            list1.clear();
        }
    }
}
